com.doclinx.ftxml
Class CatalogItem

java.lang.Object
  |
  +--com.doclinx.ftxml.CatalogItem

public class CatalogItem
extends java.lang.Object

This class represents a Catalog information block or entry. Each catalog entry corresponds to a single document. A document is typically contained in one file; however, composite files or archives (for example a .zip file) may contain multiple documents. This object is returned by the CatalogManager.catGetEntry method.

See Also:
CatalogManager

Field Summary
 com.doclinx.ftxml.FileTime access
          Date file was last accessed created.
 int attrs
          Attributes of this entry.
 com.doclinx.ftxml.FileTime creation
          Date file was created.
 long fileLength
          If composite file, then total number of bytes starting at offset.
 long fileOffset
          If composite file, then byte offset in file of component.
 int fileType
          The file type detected by the parser.
 java.lang.String sAuxInfo
          Extra information returned from the processing of the file.
 java.lang.String sFileName
          File name of document.
 java.lang.String sUrlInfo
          If using a mapfile from a webcrawl, then this field contains the URL where the file originated.
 com.doclinx.ftxml.FileTime write
          Date file was last modified.
 
Constructor Summary
CatalogItem()
           
 
Method Summary
 boolean getAttr(int attr)
          Checks the passed in bit fields and return true if any of the bits in the attr parameter correspond the the attrs field.
 void loadFromBytes(byte[] data)
           
 byte[] toBytes()
           
 java.lang.StringBuffer toHtml(int position)
          Returns an HTML representation of this CatalogItem object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sFileName

public java.lang.String sFileName
File name of document. If composite has 'offset:length' appended. If archive file, then the component file name is appended.


attrs

public int attrs
Attributes of this entry. These bit settings are defined starting at IS_FILTER1. Some bit values are API input settings, others are generated. The values indicate information about how the entry was created, if it's a composite or archive component, or if marked for deletion.


creation

public com.doclinx.ftxml.FileTime creation
Date file was created. (Not used in Java version -- EXCEPT contains the component number if entry derived from composite files).


access

public com.doclinx.ftxml.FileTime access
Date file was last accessed created. (Not used in Java version -- EXCEPT if 1st component of composite entry. In this case, contains total number of component objects).


write

public com.doclinx.ftxml.FileTime write
Date file was last modified. This is used to check if the file has changed when using ADD_MODE_MODIFIED mode in the catAddFile method.

See Also:
FileTime

sUrlInfo

public java.lang.String sUrlInfo
If using a mapfile from a webcrawl, then this field contains the URL where the file originated. This can also be set using catLastEntryStringUpdateURL method when adding files one at a time. This URL data is not used by the catalog manager.


fileType

public int fileType
The file type detected by the parser. SR_HTML: HTML file. SR_XML: XML file. All other values see file sccfi.h.


fileOffset

public long fileOffset
If composite file, then byte offset in file of component.


fileLength

public long fileLength
If composite file, then total number of bytes starting at offset. Otehrwise, the length of the single item file.


sAuxInfo

public java.lang.String sAuxInfo
Extra information returned from the processing of the file. There are several components, each delimited by a line feed ('\n'). Items can be empty if no information for a particular object.
  Format: "TITLE\nABSTRACT\nENCODING\nALT TITLE\nADDITIONAL TEXT\nPARMS"

          Note: TITLE and ABSTRACT are returned if the tag XML containing
                containing this information is set with the catSetXMLSemantics method.
                ALT TITLE is a user supplied title and may be indexed if the sr_indexAltTitle parameter
                is used. 
                ADDITIONAL TEXT is never indexed.
                ENCODING is the value of the HTML charset or XML encoding attribute.
                PARMS are any user defined parameter values for the file.
See sr_altTitle parse parameter for more information.

Constructor Detail

CatalogItem

public CatalogItem()
Method Detail

toHtml

public java.lang.StringBuffer toHtml(int position)
Returns an HTML representation of this CatalogItem object. Used primarily for debugging.

Parameters:
position - The entry number of the Catalog Item
Returns:
StringBuffer containing an HTML table fragment
Throws:
**none - **

getAttr

public boolean getAttr(int attr)
Checks the passed in bit fields and return true if any of the bits in the attr parameter correspond the the attrs field.

Parameters:
attr - Bits to check against the attrs field
Returns:
true if both attr and attrs have bits set in same position.
Throws:
**none**
See Also:
SRC2STF_PARMS.IS_FILTER1

toBytes

public byte[] toBytes()

loadFromBytes

public void loadFromBytes(byte[] data)